package com.lhnstart.learn.bases.string_;

/**
 * String 案例分析
 *
 * @author lhn
 * @date 2023/08/01 20:24
 * @since 1.0.0
 **/
public class StrtingExercise09 {

    public static void main(String[] args) {
        String s1 = "hspedu";
        String s2 = "java";
        String s5 = "hspedujava";
        String s6 = (s1 + s2).intern();
        System.out.println(s5 == s6);
        System.out.println(s5.equals(s6));
        System.out.println(System.identityHashCode(s5));
        System.out.println(System.identityHashCode(s6));
    }

}